class Stack:
    def __init__(self) :
        self.stack=[]
    def push(self,element):
        self.stack.append(element)
    def pop(self):
        return self.stack.pop()
    def get_top(self):
        if len(self.stack)>0:#列表中有元素
            return self.stack[-1]
        else:
            return None
if __name__=="__main__":
    stack=Stack()
    stack.push(1)
    stack.push(2)
    stack.push(3)
    stack.push(4)
    print(stack.pop())
    print(stack.get_top())
    
